package com.action.customer;

import com.db.customer.*;

public class InsertAction {

	private String id;
	private String subject;
	private String content;
	private String pwd;
	private CustomerDAO customer;

	private int boardtype;

	public CustomerDAO getCustomer() {
		return customer;
	}

	public void setCustomer(CustomerDAO customer) {
		this.customer = customer;
	}

	public int getBoardtype() {
		return boardtype;
	}

	public void setBoardtype(int boardtype) {
		this.boardtype = boardtype;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String insert() throws Exception {

		CustomerVO vo = new CustomerVO();
		vo.setId(id);
		vo.setSubject(subject);
		vo.setContent(content);
		vo.setPwd(pwd);
		vo.setType(boardtype);

		customer.customerInsert(vo);

		return "success";
	}
}
